/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.controller;

import cn.webrx.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>Project: mp2022 - HomeController
 * <p>Powered by webrx On 2022-04-16 09:22:05
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@RestController @RequestMapping("home")
public class HomeController {

    @Autowired
    BookMapper bookMapper;

    @RequestMapping("index")
    public Map<String,Object> index(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("data",bookMapper.selectList(null));
        return map;
    }
}
